{extend name="public/base"/}
 {block name="content"}
  <section class="content">
           <div class="row">
	<div class="col-xs-12">
		<div class="box">
					<div class="box-header" style="zoom:1;overflow: hidden;">
                <h3 class="box-title">
				<a href="{:U('Message/index')}" class="btn btn-primary">留言管理列表</a>
				</h3>
				
				 <h3 class="box-title">
				<a href="{:U('Message/addmessage')}" class="btn btn-primary">增加留言</a>
				</h3>
				
				 <h3 class="box-title">
				<a href="{:U('Message/mType')}" class="btn btn-primary">留言类别</a>
				</h3>
				
				<h3 class="box-title">
				<a href="{:U('Message/addType')}" class="btn btn-primary">添加留言类别</a>
				</h3>

			</div>

			<!-- /.box-header -->
			<div class="box-body">
				<table class="table table-bordered table-hover">
				<!-- 列表头部 -->
				<thead>
				<tr>
					<th>序号</th>
					<th>名称</th>
					<th>标识</th>
					<th>操作</th>
				</tr>
				</thead>
				<!-- 列表头部 -->
				
				<!-- 循环列表 -->
				
				{volist name="mtype" id="data"}
				<tbody style="border:none">	
				<tr>
					<td>{$data.id}</td>
					<td>{$data.name}</td>
					<td>{$data.biaoshi}</td>
					<td>
					<a href="{:U('Message/edit',array('id'=>$data['id']))}">编辑|</a>
					<a href="{:U('Message/delType',array('id'=>$data['id']))}">删除</a>
					</td>
				</tr>    
				</tbody>
				{/volist}
<script language="javascript" type="text/javascript">
	 
	$(document).ready(function(){
		 <!-- 标记显示开始-->
		$(".status").click(function(){
			   if($('.status').is(':checked')) {
					   
				$.ajax({  
				  type:"post",  
				  url:"{:U('Message/status')}",  
				  dataType: "json",
				  data:{
					  status:1, 
					  id:$(this).val(), 
					},  
					 });
				alert('标记成功');	
			 }else{
				$.ajax({  
				  type:"post",  
				  url:"{:U('Message/status')}",  
				  dataType: "json",
				  data:{
					  status:0, 
					  id:$(this).val(), 

					},  
					 });
				  alert('取消标记成功');	
				}
				
				
				
		});  
		<!-- 导航显示结束-->  
	});
</script> 
				
				
				
								
				<!-- 循环列表 END -->
				</table>
				
			</div>
		</div>
	</div>
</div>

 
			</section>
 {/block}